using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ccr;

namespace TestConsole
{
    class Hi {}

    [Autorun]
    class HelloWorld : Actor
    {
        [Handler]
        private void OnHi(Hi msg)
        {
            Console.WriteLine("Hello World!");                         
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            using (Factory.Dispatcher)
            using (var actor = new HelloWorld())
            {
                actor.Post<Hi>();

                Console.ReadKey();
            }       
        }
    }
}
